import { Component } from 'react';
import { ActivityIndicator } from 'antd-mobile';
import PropTypes from 'prop-types';

export default class Loading extends Component<any> {
  static propTypes = {
    show: PropTypes.bool.isRequired,
  };

  static defaultProps = {
    show: true,
  };

  render() {
    return (
      <div className="global_loading">
        <ActivityIndicator toast animating={this.props.show} />
      </div>
    );
  }
}
